package com.fengmi.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author 123
 * @Date 2022/2/9 20:46
 * @Version 1.0
 */

@Data
@ExcelTarget("user")
public class SysUser implements Serializable {
    /**
     * 用户编号
     */
    @Excel(name = "用户编号")
    private Integer userId;
    /**
     * 用户名
     */
    @Excel(name = "用户名")
    private String userName;
    /**
     * 登录帐户
     */
    @Excel(name = "登录帐户")
    private String account;
    /**
     * 登录密码
     */
    @ExcelIgnore
    private String password;
    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;
    /**
     * 人员类型(1:客服账号;2:管理账号;3:内置账号;4：财务账号 5：物流账号)
     */
    @Excel(name = "人员类型", replace = {"客服账号_1","管理账号_2","内置账号_3","财务账号_4","物流账号_5"})
    private String userType;
    /**
     * 启用状态
     */
    @Excel(name = "启用状态" ,replace = {"冻结_0","启用_1"})
    private Integer enabled;
    /**
     * 最后登录时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "最后登录时间",format = "yyyy年MM月dd日")
    private Date loginTime;
    /**
     * 角色ID
     */
    @ExcelIgnore
    private String roleId;
    /**
     *
     */
    @ExcelIgnore
    private String self;
    /**
     *
     */
    @Excel(name = "电话号码")
    private String phone;
    /**
     *
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "创建时间",format = "yyyy年MM月dd日")
    private Date createTime;

    // 组合角色信息
    @ExcelIgnore
    private String roles;

    // 组合权限信息
    @ExcelIgnore
    private String permissions;
}
